<script setup>
	const props = defineProps({
		isShowMore: {
			type: Boolean,
			default: () => true
		}
	})
	const emit = defineEmits(['clickMore'])
</script>

<template>
	<view class="d-flex d-flex-jcsb d-flex-aic head">
		<view class="d-flex d-flex-aic">
			<span class="mr-normal icon"></span>
			<span class="title">
				<slot name="title"></slot>
			</span>
		</view>
		<view class="d-flex d-flex-aic more" v-if="isShowMore" @click="emit('clickMore')">
			查看更多
			<uv-icon name="arrow-right" size="18"></uv-icon>
		</view>
	</view>
	<view class="mt-small">
		<slot name="content"></slot>
	</view>
</template>

<style lang="scss" scoped>
	.head {
		height: 40px;

		.icon {
			width: 4px;
			height: 16px;
			border-radius: 2px;
			background-color: #18b566;
		}

		.title {
			font-weight: bold;
		}

		.more {
			color: #999;
			font-size: 14px;
		}
	}
</style>